package com.hdaccp.shuiguoD.service.impl;

import com.hdaccp.shuiguoD.dao.CangkuDao;
import com.hdaccp.shuiguoD.entity.Cangku;
import com.hdaccp.shuiguoD.service.CangkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CangkuServiceImpl implements CangkuService {
    @Autowired
    private CangkuDao cangkuDao;

    @Override
    public List<Cangku> getAll() {
        return cangkuDao.queryAll();
    }

    @Override
    public long findTotalCount(String cname) {
        return cangkuDao.getTotalCount(cname);
    }

    @Override
    public List<Cangku> findAll(String cname, int offset, int limit) {
        return cangkuDao.query(cname,offset,limit);
    }
}
